package com.example.rg1movieinfoapp;

import androidx.appcompat.app.AppCompatActivity;

import android.content.Intent;
import android.os.Bundle;
import android.widget.TextView;

import com.example.rg1movieinfoapp.image.SmartImageView;

public class MovieInfoActivity extends AppCompatActivity {

    private TextView textViewTitle;
    private TextView textViewDetail;
    private SmartImageView imageViewBill;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_movie_info);
        textViewTitle=findViewById(R.id.textViewTitle);
        textViewDetail=findViewById(R.id.textViewdetail);
        imageViewBill=findViewById(R.id.imageViewBill);
        Intent intent=getIntent();
        MovieInfo movieInfo=(MovieInfo) intent.getSerializableExtra("movieinfo");
        textViewTitle.setText(movieInfo.getName());
        textViewDetail.setText(movieInfo.getInfo());
        imageViewBill.setImageUrl("http://sdchengjie.uicp.net/drawable/"+movieInfo.getImg());
    }
}
